package com.wind.weblog.web.controller;

import com.wind.weblog.common.Response;
import com.wind.weblog.common.aspect.ApiOperationLog;
import com.wind.weblog.web.model.vo.search.SearchArticlePageListReqVO;
import com.wind.weblog.web.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @BelongsProject: wind-blog-admin
 * @BelongsPackage: com.wind.weblog.web.controller
 * @Author: shanzhengfei
 * @CreateTime: 2024-11-13  11:50
 * @Description: TODO
 * @Version: 1.0
 */

@RestController
public class SearchController {

    @Autowired
    private SearchService searchService;

    @PostMapping("/article/search")
    @ApiOperationLog(description = "文章搜索")
    public Response searchArticlePageList(@RequestBody @Validated SearchArticlePageListReqVO searchArticlePageListReqVO) {
        return searchService.searchArticlePageList(searchArticlePageListReqVO);
    }

}
